package GUI;

import java.awt.CardLayout;
import java.io.IOException;

import javax.swing.JFrame;
import javax.swing.JPanel;
/**
 * This class create  MainScreen GUI
 * @author Gabi Revah
 * @author Aviad Almog
 */
public class MainScreen extends JFrame  {
	public static JFrame frm;
	
	/**
	 * Constructor of main screen 
	 */
	public MainScreen() {
	}

	public static CardLayout cardLayot;
	public static JPanel card = new JPanel();
	
	//public static Object contentPane;
	/**
	 * Creante the main screen jframe 
	 * @throws IOException
	 */
	public static void BuildScreen() throws IOException
	{
		

		
	}
/**
 * Get the corrent card
 * @return the correct jpanel 
 */
	public static JPanel getCard() {
		return card;
	}
/**
 * Set the correct card 
 * @param card- Panel 
 */
	public static void setCard(JPanel card) {
		MainScreen.card = card;
		
	}
	/**
	 * Creates the main screen window 
	 * @throws IOException
	 */
public static void BuildScreen1() throws IOException {

	frm= new JFrame();
	JPanel contentPane = (JPanel)frm.getContentPane();
	card.setLayout(cardLayot = new CardLayout());

	Login loginframe= new Login();

	card.add("Login", loginframe);
	cardLayot.show(card, "Login Screen");
	contentPane.add(card);
	frm.setSize(1000,750);  
	frm.setVisible(true);
	frm.setResizable(true);
	
	frm.setLocation(0, 0);
	frm.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
	
}
	
	

}